package com.example.demo.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicUpdate;

/**
 * 
* @ClassName: ApprovalEntity  
* @Description: TODO(流程审核表单)  
* @author Administrator  
* @date 2018年6月16日  
*
 */

@Entity
@Table(name="approval")
@DynamicUpdate
public class ApprovalEntity implements Serializable {

	/**ID*/
	@Id
	private String id;
	
	/**审核人*/
	@ManyToOne(cascade=CascadeType.ALL,optional=true,targetEntity=SysUser.class)
	@JoinColumn(name = "user_id")
	private SysUser user;
	
	/**审核时间*/
	@Column(name="update_date")
	private Date update_date;
	
	/**是否审核通过*/
	@Column(name="approval")
	private Boolean approval;
	
	/**当前审核对应的申请内容*/
	@ManyToOne(cascade=CascadeType.ALL,optional=true,targetEntity=ApplicationEntity.class)
	@JoinColumn(name = "approvel_id")
	private ApplicationEntity approvel_id;
	
	/**审核意见*/
	@Column(name="comment")
	private String comment;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public SysUser getUser() {
		return user;
	}

	public void setUser(SysUser user) {
		this.user = user;
	}

	public Date getUpdate_date() {
		return update_date;
	}

	public void setUpdate_date(Date update_date) {
		this.update_date = update_date;
	}

	public Boolean getApproval() {
		return approval;
	}

	public void setApproval(Boolean approval) {
		this.approval = approval;
	}

	public ApplicationEntity getApplication() {
		return approvel_id;
	}

	public void setApplication(ApplicationEntity application) {
		this.approvel_id = application;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}
	
	
}
